//Debugger Class Header File
//For identifying problems and flaws in the code
#pragma once

	//Include Files//
#include <Windows.h>
#include "Globals.hpp"

	//Globals & Constants//
#ifdef DEBUG
	#ifndef HR
		#define HR(x)															\
		{																		\
			if(FAILED(x))														\
			{																	\
				g_Debug->GetInstance().PrintError(__FILE__, __LINE__, #x);		\
			}																	\
		}																		
	#endif
#endif

/**********************************************************************************************************************\
|	Debugging Class Declaration																						   |
\**********************************************************************************************************************/
class Debugger
{
protected:
		//Members//
	HANDLE				m_Handle;												//Console Window Handle

		//Methods//
	Debugger();																	//Prevent creation of object
	Debugger(const Debugger&);													//Prevent copy-construction

	void EndLine();																//Write newline character to console

public:
		//Members//
	HRESULT				m_hr;													//Error Message Handle

		//Methods//
	Debugger& GetInstance();													//Retrieve Instance
	~Debugger();																//Destructor

	void Init(char* WindowTitle);												//Initialize Console and Debugger
	void Exit();																//Release and Delete members

	void PrintString(char* Message);											//Print a Message to Console
	void PrintError(char* File, int Line, char* Function);						//Print a uniform Error to Console
};

static Debugger* g_Debug;